package cn.itsource.hrm.validation;

import cn.itsource.hrm.exception.ErrorEnum;
import org.springframework.util.StringUtils;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.lang.annotation.Annotation;

public class MyNotEmptyValidator implements ConstraintValidator<MyNotEmpty, String> {

    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        return StringUtils.isEmpty(value);
    }
}
